package com.hospital.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class Refund {
    @NotNull(message = "id不得为空")
    private int refund_id;

    @NotNull(message = "patient_id不得为空")
    private int patient_id;

    @NotNull(message = "refund_type不得为空")
    private int refund_type;

    @NotNull(message = "refund_way不得为空")
    private int refund_way;

    @NotNull(message = "refund_price不得为空")
    private double refund_price;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "退款时间不得为空")
    private Date refund_time;
}
